function y=double_cluster_dt(dt)

%DOUBLE_CLUSTER_DT version of double_cluster for dt variables
%Synatx: y=double_cluster_dt(dt)

y=double_cluster(dt.nx,'sample','variable');
G=get(gcf);
G2=get(G.Children(2));G3=get(G.Children(3));
n=length(dt.samples);
set(G.Children(2),'XTickLabel',dt.samples(y.Ix),'FontSize',min([4+100/n,8]));
set(G.Children(3),'XTickLabel',dt.vars(y.Iy));
set(G.Children(3),'XTickLabel','');%remove labels
n=length(dt.x(1,:));
axes(G.Children(3));ax=axis;
for i=1:n %rotate new text labels
    text(i,ax(3)-0.05*(ax(4)-ax(3)),dt.vars(y.Iy(i)),'HorizontalAlignment','left','rotation',-90,'FontSize',min([4+100/n,8]));
end

% black dots and white dots for 1/0 outcomes
%if 0
axes(G.Children(2));hold on
ax=axis;
f=find(dt.y==0); %find negative outcomes
for i=1:length(f)
    fi=find(y.Ix==f(i));
    plot(fi,ax(3),'o','MarkerFaceColor','w','MarkerSize',min([4+40/n,8]))
end
f=find(dt.y==1); %find positive outcomes
for i=1:length(f)
    fi=find(y.Ix==f(i));
    plot(fi,ax(3),'ko','MarkerFaceColor','k','MarkerSize',min([4+40/n,8]))
end

%end